import Http from '../http';

export function chargeApi(params:{deviceId : string|number; portNo: string|number; amount:string|number}) {
    return Http.post('charge', params)
}

export function queryChargeStatusApi(orderId:number) {
    return Http.get('charge/status/' + orderId)
}

export function addChargeApi(orderId:number, amount:number) {
    return Http.post('charge/addCharge', {chargeOrderId : orderId, amount})
}

export function queryAddChargeStatusApi(orderId:number) {
    return Http.get('charge/addStatus/' + orderId)
}


export function stopChargeApi(orderId:number) {
    return Http.post('charge/stop', { orderId })
}

export function queryStopChargeStatusApi(orderId:number) {
    return Http.get('charge/stopStatus/' + orderId)
}
